import box/logger

Check-Frpc-Config(){
  [ -t 0 ] || local __stdin="$(cat)"
  local __stdout
  local __reg='.|has("serverAddr","serverPort")and.proxies[0]|has("name","type","localIP","localPort","remotePort")'
  local __type="$(yq -p toml "$__reg" <<<"$__stdin" "$@" 2>/dev/null)"
  case $__type in
    true):;;
    *)Err "不符合 Frpc 配置要求";return 1
  esac
}